<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
session_start();
class Admininput extends CI_Controller {

	var  $temp = 'backend';
	var $error ="";
	public function __construct()
	{
		parent::__construct();
		$this->load->library('parser');
		$this->load->helper('form');
		$this->load->helper(array('form', 'url'));
		$this->load->helper('language');
		$this->load->helper('html');
		$this->load->library('encrypt');
		$this->load->helper('url');
		$this->load->library('image_lib');
		$this->load->library('session');
		$this->load->library('zip');
		$this->load->library('unzip');
	}
	public function index($bannerid=0,$index=1){
		if(strlen($index)<1){
			$index=1;
		}
		if(!($index>0)){
			$index = 1;
		}
		if(!($bannerid>0)){
			$bannerid = 0;
		}
		if(isset($_SESSION['userkey'])){
			$this->load->model('functions_model');
			
			$data = array(
	            'username' =>  $this->session->userdata('username'),
				'ipaddress' => $this->session->userdata('session_id'),
				'error' =>$this->error,
				'modules' =>$this->functions_model->getlistfunctions_type(1)			
			);
			$this->load->model('product_model');
			$data = array(
	            'username' =>  $this->session->userdata('username'),
				'ipaddress' => $this->session->userdata('session_id'),
				'error' =>$this->error,
				'modules' =>$this->functions_model->getlistfunctions_type(1),
			    'list' => $this->product_model->getreportinput()
			);
			//$this->parser->parse($this->temp.'/'.'adminproduct', $data);
			//$this->load->view('backend/product',$data);
			$this->parser->parse($this->temp.'/'.'dashboard', $data);
		}
		else {
			redirect('admincp/index');
		}
	}
	
}
